package at.fhooe.engine.event.events;

import at.fhooe.engine.event.EventListener;

public class MouseButtonDownEvent extends Event {

	public static final String TYPE = "MouseButtonDownEvent";
	private int m_button;
	private int m_positionX;
	private int m_positionY;
	
	public MouseButtonDownEvent(int button, int posX, int posY) {
		super(TYPE);
		m_button = button;
		m_positionX = posX;
		m_positionY = posY;
	}
	
	public int getButton() {
		return m_button;
	}

	public int getPositionX() {
		return m_positionX;
	}

	public int getPositionY() {
		return m_positionY;
	}

	@Override
	public void processEvent(EventListener eventListener) {
		((Listener) eventListener).onMouseButtonDownEvent(this);
	}

	//embedded listener interface with the specific function call
	public interface Listener extends EventListener {
		public void onMouseButtonDownEvent(MouseButtonDownEvent mouseButtonDownEvent);
	}
}
